package com.ls.fw.data.search.impl.lucene.parser;

import org.apache.lucene.search.BooleanQuery;

import com.ls.fw.common.beanparser.bean.WhereInfo;
import com.ls.fw.common.beanparser.visitor.ExpressionVisitor;



public class WhereParser extends SubExpressionParser implements ExpressionVisitor{

	private StringBuilder sql = new StringBuilder(" where 1=1 ");
	private BooleanQuery query = new BooleanQuery();
	
	public WhereParser(WhereInfo whereInfo){
		super(whereInfo.getList(),false);
		sql.append(super.getSql());
		query = super.getQuery();
	}
 
	public void setSql(StringBuilder sql) {
		this.sql = sql;
	}

	public StringBuilder getSql() {
		return sql;
	}

	public BooleanQuery getQuery() {
		return query;
	}

	public void setQuery(BooleanQuery query) {
		this.query = query;
	}
}
